home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Subject: Re: Help:what is wrong th
- Message-ID: <Dpotxz.6nq@rci.ripco.com>
- X-Nntp-Sender: mambuhl@cook.ripco.com
- Sender: usenet@rci.ripco.com (Net News Admin)
- Organization: Ripco Internet BBS Chicago
- Date: Thu, 11 Apr 1996 07:53:59 GMT
-
- prye@cyllene.uwa.edu.au (Peter Rye)
- in <PRYE.96Apr10231219@cyllene.uwa.edu.au> asks:
-
- >But when I try this my compiler complains:
-
- >ub239:~$ cat junk.c
- >#include <math.h>
- >#include <stdio.h>
-
- >int main() {
- > double x = 3.232;
- > printf("%lf\n", sqrt(x));
- > return 0;
- >}
- >ub239:~$ gcc -c -Wall -ansi -pedantic junk.c
- >junk.c: In function `main':
- >junk.c:6: warning: use of `l' length character with `f' type character
-
- >Why ? ;-)
- >--
-
-
- From ISO 7.9.6.1 The fprintf function
-
- "...an optional l (ell) specifying that a following d, i, o, u,
- x, or X conversion specifier applies to a long int or unsigned
- long int argument; an optional l specifying that a following n
- conversion specifier applies to a pointer to a long int
- argument; or an optional L specifying that a following e, E, f,
- g, or G conversion specifier applies to a long double argument
- ..."
-
- Case counts in C.
-
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-